
<html>
<head>
    <meta charset="UTF-8">
    <title>考核查看</title>
    <link rel="stylesheet" type="text/css" href="/META-INF/resources/static/devtools30/js/bootstrap-3.3.5/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/META-INF/resources/static/devtools30/js/jquery-easyui-1.5/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/META-INF/resources/static/devtools30/js/jquery-easyui-1.5/themes/icon.css">
    <link rel="stylesheet" href="/META-INF/resources/static/devtools30/js/plugins/validationEngine/css/validationEngine.jquery.css" type="text/css"/>
    <link rel="stylesheet" type="text/css" href="/META-INF/resources/static/devtools30/css/styledevtools.css">
    <link rel="stylesheet" href="/META-INF/resources/static/devtools30/js/plugins/layer/skin/layer.css" />
    <link rel="stylesheet" type="text/css" href="/static/portalres/jsfolder/htmlxjs/skins/dhtmlxgrid.css"/>
    <link rel="stylesheet" type="text/css" href="/static/portalres/jsfolder/htmlxjs/skins/dhtmlxgrid_pgn_bricks.css"/>

    <script type="text/javascript" src="/static/portalres/jsfolder/htmlxjs/dhtmlxcommon.js"></script>
    <script type="text/javascript" src="/static/portalres/jsfolder/htmlxjs/dhtmlxcontainer.js"></script>
    <script type="text/javascript" src="/static/portalres/jsfolder/htmlxjs/dhtmlxgrid.js"></script>
    <script type="text/javascript" src="/static/portalres/jsfolder/htmlxjs/dhtmlxgridcell.js"></script>
    <script type="text/javascript" src="/static/portalres/jsfolder/htmlxjs/dhtmlxgrid_filter.js"></script>
    <script type="text/javascript" src="/static/portalres/jsfolder/htmlxjs/dhtmlxgrid_pgn.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/bootstrap-3.3.5/bootstrap.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/jquery-easyui-1.5/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/jquery-easyui-1.5/datagrid-filter.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/jquery-easyui-1.5/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/my97DatePicker/WdatePicker.js" ></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/easyuiPager.js?=5"></script>

    <script src="/META-INF/resources/static/devtools30/js/plugins/validationEngine/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
    <script src="/META-INF/resources/static/devtools30/js/plugins/validationEngine/languages/jquery.validationEngine-zh_CN.js" type="text/javascript" charset="utf-8">
    </script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/ajaxfileupload.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/datagrid-dnd.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/FormValidation.js"></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/commondevtools.js"></script>

    <style>
        /*去掉滚动条*/
        /*body{overflow-y:hidden;}*/
    </style>

    <script src='/static/portalres/jsfolder/htmlxjs/dhtmlxgrid_export.js'></script>
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/md5-min.js"></script>

    <!--<script type="text/javascript" src="/static/js/dlcommon.js" ></script>-->
    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/jquery.cookie.js"></script>

    <script type="text/javascript" src="/META-INF/resources/static/devtools30/js/usetools/dldevusetool.js"></script>

    <script type="text/javascript">
        //		点取消关闭窗口
        function clearall(){
            var index = parent.layer.getFrameIndex(window.name); //获取当前窗体索引
            parent.layer.close(index); //执行关闭
        }
        function btnclose(){
            closeIndexWindwos();
        }

    </script>


    <script>

        var height = findDimensions_height();
        var width = findDimensions_width();

        $(function () {
            var column = [
                [
                    { title: '考核指标', colspan: 5 },
                    { title: '分数', colspan: 2 }
                ], [
                { field: 'YJName', title: '项目', width: 30, halign: 'center', align: 'left' },
                { field: 'EJName', title: '细项', width: 70, halign: 'center', align: 'left' },
                { field: 'SJName', title: '考核内容', width: 280, halign: 'center', align: 'left' },
                { field: 'BZZ', title: '标准值', width: 70, halign: 'center', align: 'left' },
                { field: 'SJZ', title: '实际值', width: 70, halign: 'center', align: 'left' },
                { field: 'KF', title: '扣分', width: 80, align: 'center',
                    formatter: function (value, row, index) {
                        if (row.IsJCZB != 1) {
                            var val = value == null ? 0 : value
                            return "<input id='TXT_KF_" + row.ZBID + "' type='text' style='width: 90%' value='" + val + "' class='easyui-numberbox' />";
                        }
                    }
                },
                { field: 'JF', title: '加分', width: 80, align: 'right', halign: 'center',
                    formatter: function (value, row, index) {
                        if (row.IsJCZB != 1) {
                            var val = value == null ? 0 : value
                            return "<input id='TXT_JF_" + row.ZBID + "' type='text' style='width: 90%' value='" + val + "' class='easyui-numberbox' />";
                        }
                    }
                }
            ]]

            column = [[{
                "field": "cell",
                "rowspan": 2,
                "title": "RW",
                "width": 100,
                "align": "left",
                "sortable": true,
                "halign": "center",
                "deltaWidth": 1,
                "boxWidth": 99,
                "cellClass": "datagrid-cell-c2-cell"
            },{
//                "field": "cell111",
//                "colspan": 3,
//                "title": "RW111",
//                "width": 100,
//                "align": "right",
//                "sortable": true,
//                "halign": "center",
//                "deltaWidth": 1,
//                "boxWidth": 99,
//                "cellClass": "datagrid-cell-c2-cell"
//            }], [{
                "field": "cell0",
                "rowspan": 2,
                "title": "出院人数",
                "width": 110,
                "align": "right",
                "sortable": true,
                "halign": "center",
                "deltaWidth": 1,
                "boxWidth": 99,
                "cellClass": "datagrid-cell-c2-cell0"
            }, {
                "field": "cyrs",
                "colspan": 2,
                "title": "出院人数",
                "width": 120,
                "align": "left",
                "sortable": true,
                "halign": "center",
                "id": "datagrid-td-group2-0-2",
                "deltaWidth": 1,
                "boxWidth": 99,
                "cellClass": "datagrid-cell-c2-cyrs"
            }], [{
                "field": "c1",
                "rowspan": 0,
                "title": "男",
                "width": 130,
                "align": "right",
                "sortable": true,
                "halign": "center",
                "deltaWidth": 1,
                "boxWidth": 99,
                "cellClass": "datagrid-cell-c2-c1"
            }, {
                "field": "ce",
                "rowspan": 0,
                "title": "女",
                "width": 140,
                "align": "right",
                "sortable": true,
                "halign": "center",
                "deltaWidth": 1,
                "boxWidth": 99,
                "cellClass": "datagrid-cell-c2-ce"
            }]]


            $('#inputdivhand').datagrid({
                nowrap: false,
                striped: true,
                border: true,
                collapsible: false,
                singleSelect: true,
                pagination: false,
                rownumbers: true,
                columns:column
            });
            griddata =  [{cell:11,cell0:"",c1:33,ce:5},{cell:111,cell0:"",c1:333,ce:55},
                {cell:11,cell0:"",c1:33,ce:555},{cell:111,cell0:"",c1:333,ce:5555},
                {cell:11,cell0:"",c1:33,ce:55555},{cell:111,cell0:"",c1:333,ce:6},
                {cell:11,cell0:"",c1:33,ce:66},{cell:111,cell0:"",c1:333,ce:666},
                {cell:11,cell0:"",c1:33,ce:6666},{cell:111,cell0:"",c1:333,ce:66666}];

            $('#inputdivhand').datagrid("loadData", griddata);
        });

        function exportData() {
            $('#inputdivhand').datagrid('toExcel', '/ExportController/excel', 'color');
        }

        // (function () {
        //     $.extend($.fn.datagrid.methods, {
        //         toExcel: function (jq, url, mode, header, footer, rows) {
        //             mode = mode || "color";
        //             var datagridObj = jq;
        //             var selector = $(jq).selector;
        //             //$(this).datagrid("getPanel")
        //             datagridObj._asCDATA = true;
        //             // alert(123);
        //             console.log(selector);
        //             // alert(JSON.stringify($('#inputdivhand').datagrid('options')));
        //             // alert(JSON.stringify($('#inputdivhand').datagrid('options').columns));
        //             // alert(JSON.stringify($(datagridObj).datagrid('options').columns));
        //             var columnsObj = deepClone($(datagridObj).datagrid('options').columns);
        //             var dataFields = $(selector).datagrid('getColumnFields');
        //             var gridData = $(selector).datagrid('getData').rows;
        //             //var dataFields = $(datagridObj).datagrid('getColumnFields', true);
        //             //alert(JSON.stringify(columnsObj));
        //             // alert(JSON.stringify(dataFields));
        //             function _serialiseExportConfig(spans) {
        //                 var out = "<head>";
        //
        //                 for (var i = 0; i < columnsObj[0].length; i++) {
        //                     // if (this._srClmn && !this._srClmn[i]) continue;
        //                     var sort = columnsObj[0][i].type||'str';
        //                     var onespan = spans[0][i];
        //                     //console.log(i);
        //                     //console.log(spans);
        //                     //console.log(onespan);
        //                     var rpans = ((onespan[1] && onespan[1] > 1) ? ' rowspan="' + onespan[1] + '" ' : "") + ((onespan[0] && onespan[0] > 1) ? ' colspan="' + onespan[0] + '" ' : "");
        //                     out += "<column " + rpans
        //                         + " width='" + (columnsObj[0][i].width || "100")
        //                         + "' align='" + (columnsObj[0][i].align || "100")
        //                         //ro na
        //                         + "' type='" +  ("ro")
        //                         //str na
        //                         + "' sort='" + (sort || "na")
        //                         + "' color='" + (columnsObj[0][i].color || "")
        //                         + "'"
        //                         + ">";
        //                     if (this._asCDATA)
        //                         out += "<![CDATA[" + columnsObj[0][i].title  + "]]>";
        //                     else
        //                         out +=  columnsObj[0][i].title ;
        //
        //                     out += "</column>"
        //                 }
        //                 return out += "</head>";
        //             }
        //
        //             function xml_top(profile) {
        //                 var spans = [];
        //                 //console.log(JSON.stringify(columnsObj[0].length))
        //                 //console.log(JSON.stringify(dataFields.length))
        //                 //console.log(JSON.stringify(columnsObj))
        //                 for (var i = 0; i < columnsObj.length; i++) {
        //                     spans[i] = [];
        //                     for (var j = 0; j < dataFields.length; j++) {
        //                         var cellColumn = columnsObj[i][j];
        //                         if (!spans[i][j]){
        //                             spans[i][j] = [0, 0];
        //                         }
        //                         if(!cellColumn){
        //                             cellColumn={"colspan":0,"rowspan":0,"title":''};
        //                             columnsObj[i][j]=cellColumn;
        //                         }
        //                         if(!cellColumn.hasOwnProperty('colspan')){
        //                             cellColumn.colspan=0;
        //                         }
        //                         if(!cellColumn.hasOwnProperty('rowspan')){
        //                             cellColumn.rowspan=0;
        //                         }
        //                         //console.log("++:: "+JSON.stringify(columnsObj[i]));
        //                         //console.log("++:: "+JSON.stringify(cellColumn));
        //                         if(cellColumn.colspan&&cellColumn.colspan>1){
        //                             for(var k=dataFields.length-1;k>j+cellColumn.colspan;k--){
        //                                 columnsObj[i][k]=columnsObj[i][k-cellColumn.colspan];
        //                             }
        //                             //console.log("--:: "+JSON.stringify(columnsObj[i]));
        //                             //console.log("--:: "+JSON.stringify(cellColumn));
        //                             for(var k=j+1;k<=j+cellColumn.colspan;k++){
        //                                 columnsObj[i][k]={"colspan":0,"rowspan":0,"title":'',"type":''};
        //                             }
        //                             //console.log("XXX:: "+JSON.stringify(columnsObj[i]));
        //                             //console.log("XXX:: "+JSON.stringify(cellColumn));
        //                         }
        //                         if(cellColumn.rowspan&&cellColumn.rowspan>1){
        //                             for(var k=i+1;k<i+cellColumn.rowspan;k++){
        //                                 //下面的行整体向后移动
        //                                 for(var m=columnsObj[i].length;m>j;m--){
        //                                     columnsObj[k][m]=columnsObj[k][m-1];
        //                                 }
        //                                 columnsObj[k][j]={"colspan":0,"rowspan":0,"title":'',"type":''};
        //                             }
        //                         }
        //                         if (cellColumn)
        //                             spans[i][j] = [cellColumn.colspan, cellColumn.rowspan]
        //                     }
        //                 }
        //                 console.log(JSON.stringify(columnsObj))
        //                 console.log(JSON.stringify(columnsObj[0].length))
        //                 console.log(JSON.stringify(spans))
        //                 var xml = "<rows profile='" + profile + "'";
        //                 if (header)
        //                     xml += " header='" + header + "'";
        //                 if (footer)
        //                     xml += " footer='" + footer + "'";
        //                 xml += "><head>" + _serialiseExportConfig(spans).replace(/^<head/, "<columns").replace(/head>$/, "columns>");
        //                 for (var i = 1; i <  columnsObj.length; i++) {
        //                     xml += "\n<columns>";
        //                     for (var j = 0; j < columnsObj[i].length; j++) {
        //                         var onespan = spans[i][j];
        //                         var rpans = ((onespan[1] && onespan[1] > 1) ? ' rowspan="' + onespan[1] + '" ' : "") + ((onespan[0] && onespan[0] > 1) ? ' colspan="' + onespan[0] + '" ' : "");
        //                         xml += "<column " + rpans + "><![CDATA[" + columnsObj[i][j].title + "]]></column>"
        //                     }
        //                     xml += "</columns>";
        //                 }
        //                 xml += "</head>\n";
        //                 // console.log(xml);
        //                 return xml;
        //             };
        //
        //             function xml_body() {
        //                 var xml = [];
        //                 if (rows){
        //                     for (var i = 0; i < rows.length; i++)
        //                         xml.push(xml_row(gridData[rows[i]]));
        //                 }else{
        //                     for (var i = 0; i < gridData.length; i++)
        //                         xml.push(xml_row(gridData[i]));
        //                 }
        //                 return xml.join("\n");
        //             }
        //
        //             function xml_row(oneDataRow) {
        //                 // var dataFields = $(datagridObj).datagrid('getColumnFields', true);
        //                 // var dataFields = $('#inputdivhand').datagrid('getColumnFields');
        //                 var xml = "<row>";
        //                 for (var i = 0; i < dataFields.length; i++) {
        //                     xml += "<cell><![CDATA[" + (oneDataRow[dataFields[i]] ? oneDataRow[dataFields[i]] : '') + "]]></cell>";
        //                 }
        //                 return xml + "</row>";
        //             }
        //
        //             function xml_end() {
        //                 var xml = "</rows>";
        //                 return xml;
        //             }
        //
        //             //深度克隆
        //             function deepClone(obj){
        //                 var result,oClass=isClass(obj);
        //                 //确定result的类型
        //                 if(oClass==="Object"){
        //                     result={};
        //                 }else if(oClass==="Array"){
        //                     result=[];
        //                 }else{
        //                     return obj;
        //                 }
        //                 for(key in obj){
        //                     var copy=obj[key];
        //                     if(isClass(copy)=="Object"){
        //                         result[key]=arguments.callee(copy);//递归调用
        //                     }else if(isClass(copy)=="Array"){
        //                         result[key]=arguments.callee(copy);
        //                     }else{
        //                         result[key]=obj[key];
        //                     }
        //                 }
        //                 return result;
        //             }
        //             function isClass(o){
        //                 if(o===null) return "Null";
        //                 if(o===undefined) return "Undefined";
        //                 return Object.prototype.toString.call(o).slice(8,-1);
        //             }
        //
        //
        //             // encodeURIComponent(xml_top(mode).replace("\u2013", "-") + xml_body() + xml_end());
        //             var win = window.open("", "_blank");
        //             win.document.open();
        //             win.document.write("<html><body>");
        //             win.document.write('<form id="myform" method="post" action="' + url + '" accept-charset="utf-8" enctype="text/html"><input type="hidden" name="grid_xml" id="grid_xml"/> </form>');
        //             // as long dash in post converts to some special symbols we need to convert it to simple dash by replacing using unicode \u2013
        //             win.document.getElementById("grid_xml").value = encodeURIComponent(xml_top(mode).replace("\u2013", "-") + xml_body() + xml_end());
        //             win.document.write("</body></html>");
        //             win.document.getElementById("myform").submit();
        //             win.document.close();
        //             datagridObj = null;
        //         }
        //     });
        // })(jQuery);
    </script>
</head>
<body>

<form id="kaoheform">
    <!--<div style="margin:0 5px; overflow: hidden;">-->
    <div style="margin:0 5px;">
        <div style="" class="bi-stickUp clearfix">
            <div class="" role="group" style="float:right">
                <button type="button" onclick="exportData();" class="btn btn-default bi-btn-width90">到出</button>
                <button type="button" onclick="clearall();" class="btn btn-default bi-btn-width90">退出</button>
            </div>
        </div>
        <div id="dTitle" style="height: 30px; padding-top: 5px; text-align: center;">
            <label id="fTitle" style="font-size: 15pt; font-weight: bold;">考核评价</label>
        </div>

        <div style="width:100%;float:left;display:inline-block;">
            <table id="inputdivhand" class="datagrid"></table>
        </div>
    </div>

</form>

</body>
</html>
